package com.simple.demo.desginModel.observer;

import java.util.Calendar;
import java.util.Date;

public class DesginClient {

    public static void main(String[] args) {
       //启动20个线程
        Subject om = new ObserverManager();
        Calendar cal = Calendar.getInstance();
        UserEnter userEnter = new UserEnter(om,"bml");
        UserEnter userEnter1 = new UserEnter(om,"dyq");
        UserEnter userEnter3 = new UserEnter(om,"adfd");
        om.changeOfObjserver("user " + 1,cal.getTime().toString(),"欢迎 user" + 1+" 进入聊天室"  );
        om.changeOfObjserver("user " + 2,cal.getTime().toString(),"欢迎 user" + 2+" 进入聊天室"  );

    }

}
